﻿using System.Collections.Generic;
using PerceptiveMCAPI.Types;
//
namespace PerceptiveMCAPI
{
   internal static partial class ValidateInput
   {
      // campaignSegmentTest
      internal static List<Api_ValidatorMessage> Validate( campaignSegmentTestInput input )
      {
         List<Api_ValidatorMessage> messages = ValidateBaseParameters( input as Api_BaseInput );
         Api_ValidatorMessage val;
         //-----------------------
         // apikey
         val = Validator.apikey_valid( input.parms.apikey );
         if ( val != null ) messages.Add( val );
         // list id
         val = Validator.ListId_valid( input.parms.list_id );
         if ( val != null ) messages.Add( val );
         // match code
         val = campaignSegmentTest_Validator.match_valid( input.parms.options.match );
         if ( val != null ) messages.Add( val );
         // segment options
         val = campaignSegmentTest_Validator.conditions_valid( input.parms.options.conditions );
         if ( val != null ) messages.Add( val );
         //--------------------
         return messages;
      }
   }
}
